var num=7;
function getObj(objName)
{
    return(document.getElementById(objName));
}

function tag(id)
{
    var keywords = document.getElementById("hyformnew").word.value;
	var form_hyformnew=document.getElementById("hyformnew");
    getObj("searluntan").style.display="none";
    getObj("searconrow1").style.display="block";
    if(id==7){
        getObj("searconrow1").style.display="none";
        getObj("searluntan").style.display="block";
    }
	
    if(keywords == "" || keywords=="请输入您感兴趣的产品"||keywords=="请输入产品名的关键词"||keywords=="请输入公司名的关键词"||keywords=="请输入您感兴趣的关键词")
    {
        switch(id){
            case 1:
                getObj('word').value="请输入查询关键字";
                getObj('class').value="供应";
                getObj('price').value = "";
                break;
            case 2:
                getObj('word').value="请输入查询关键字";
                getObj('class').value="采购";
                getObj('price').value = "";
                break;
            case 3:
                getObj('word').value="请输入查询关键字";
                getObj('class').value="企业";
                getObj('price').value = "";
                break;
            case 4:
                getObj('word').value="请输入查询关键字";
                getObj('class').value="资讯";
                getObj('price').value = "";
                break;
            case 5:
                getObj('word').value="请输入查询关键字";
                getObj('class').value="展会";
                getObj('price').value = "1";
                break;
            case 6:
                getObj('word').value="请输入查询关键字";
                getObj('class').value="行业资讯";
                getObj('price').value = "";
        }
    }
    else{
        document.getElementById("hyformnew").word.value = keywords;
        switch(id){
            case 1:
                getObj('class').value="供应信息";
                getObj('price').value = "";
                break;
            case 2:
                getObj('class').value="采购信息";
                getObj('price').value = "";
                break;
            case 3:
                getObj('class').value="企业信息";
                getObj('price').value = "";
                break;
            case 4:
                getObj('class').value="资讯信息";
                getObj('price').value = "";
                break;
            case 5:
                getObj('class').value="展会信息";
                getObj('price').value = "1";
                break;
            case 6:
                getObj('class').value="行业资讯";
                getObj('price').value = "";
        }
    }

    getObj("searconrow2").innerHTML=getObj("produce"+id).innerHTML;
	
    for(var i=1;i<=num;i++)
	{
		try
		{
        if(i==id) {
            getObj("changebox"+i).className="search1";
        }
        else{

            if(i==7 || i==(id-1)){
				
                getObj("changebox"+i).className="search3";
            }
            else{
                getObj("changebox"+i).className="search2";
            }
        }
		}
		catch(e)
		{}
    }
	
}

function check(theForm)
{
    if(theForm.word.value.substring(0,3)=="请输入"||theForm.word.value=="")
    {
        theForm.word.focus();
        return false;
    }
	
	var type=getObj('class').value;
	var value=encodeURI(theForm.word.value);
	switch(type)
	{
		case '供应信息':
			window.location='/exec.php?action=ancillary_supply_list&type=search&title='+value;
		break;
		
		case '采购信息':	
			window.location='/exec.php?action=ancillary_procurement_list&type=search&title='+value;
		break;
		
		case '企业信息':
			window.location='/exec.php?action=ancillary_account_list&type=search&name='+value;
		break;
		
		case '资讯信息':
			window.location='/exec.php?action=news_list&type=search&keywords='+value;		
		break;		
		
		case '展会信息':
			window.location='/exec.php?action=exhibition_infos_list&type=search&title='+value;		
		break;				
	}
	
	return false;
}
getObj("searconrow2").innerHTML=getObj("produce1").innerHTML;
function hcclick($value)
{
	return false;
}